package com.kmproject.haifu.mvp.ui.adapter;

import android.support.annotation.Nullable;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.kmproject.haifu.R;
import com.kmproject.haifu.mvp.model.entity.beans.MemberBuyRecordInfoBean;

import java.util.List;

public class MembercentermainJfjlAdapter extends BaseQuickAdapter<MemberBuyRecordInfoBean, BaseViewHolder> {
    public MembercentermainJfjlAdapter(@Nullable List<MemberBuyRecordInfoBean> data) {
        super(R.layout.membercentermain_jfjl_popuwindow_item, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, MemberBuyRecordInfoBean item) {
    helper.<TextView>getView(R.id.membercentermain_jfjl_popuwindow_item_title).setText(item.getIntroduction()+": "+item.getLevelName()+" | "+item.getRuleName());
        helper.<TextView>getView(R.id.membercentermain_jfjl_popuwindow_item_time).setText("购买日期："+item.getCreateTime().substring(0,16));
        helper.<TextView>getView(R.id.membercentermain_jfjl_popuwindow_item_money).setText(item.getDiscountAmount()+"元");

    }
}
